<!DOCTYPE HTML>
<html>
<body>
  <div id="elem" style="overflow-y:scroll;width:300px;height:200px;border:1px solid black">
    text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text
    text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text
    text text text text text text text text text text text text text text text text text text text text text text text text text text
  </div>

  The element has <code>style="width:300px"</code>
  <br>

  <button onclick="alert( getComputedStyle(elem).width )">alert( getComputedStyle(elem).width )</button>

</body>
</html>
